//package com.pucheng.bracelet.app.dispatcher;
//
//import com.pucheng.bracelet.ui.fragment.gpsrun.GpsRunFragment;
//
//import java.lang.ref.WeakReference;
//
//import permissions.dispatcher.PermissionRequest;
//import permissions.dispatcher.PermissionUtils;
//public class GpsRunPermissionsDispatcher {
//    public static final String[] PERMISSION_ARRAY = {"android.permission.ACCESS_BACKGROUND_LOCATION"};
//
//    private static final class GpsRunFragmentPermissionsRequest implements PermissionRequest {
//
//        private final WeakReference<GpsRunFragment> runFragmentWeakReference;
//
//        @Override
//        public void proceed() {
//            GpsRunFragment GpsRunFragment = (GpsRunFragment) this.runFragmentWeakReference.get();
//            if (GpsRunFragment != null) {
//                GpsRunFragment.requestPermissions(GpsRunPermissionsDispatcher.PERMISSION_ARRAY, 6);
//            }
//        }
//
//        private GpsRunFragmentPermissionsRequest(GpsRunFragment GpsRunFragment) {
//            this.runFragmentWeakReference = new WeakReference<>(GpsRunFragment);
//        }
//
//        @Override
//        public void cancel() {
//
//        }
//    }
//
//    public static void verifyPermissions(GpsRunFragment GpsRunFragment,  int[] iArr) {
//            if (PermissionUtils.verifyPermissions(iArr)) {
//                GpsRunFragment.requestBackgroundLocation();
//            } else if (!PermissionUtils.shouldShowRequestPermissionRationale(GpsRunFragment, PERMISSION_ARRAY)) {
//                GpsRunFragment.noLocationPermissions();
//            } else {
//                GpsRunFragment.mo19242J1();
//            }
//    }
//
//    static void m8527c(GpsRunFragment GpsRunFragment) {
//        if (PermissionUtils.shouldShowRequestPermissionRationale(GpsRunFragment.getActivity(), PERMISSION_ARRAY)) {
//            GpsRunFragment.requestBackgroundLocation();
//        } else if (PermissionUtils.shouldShowRequestPermissionRationale(GpsRunFragment, PERMISSION_ARRAY)) {
//            GpsRunFragment.mo19244M1(new GpsRunFragmentPermissionsRequest(GpsRunFragment));
//        } else {
//            GpsRunFragment.requestPermissions(PERMISSION_ARRAY, 6);
//        }
//    }
//}
